#ifndef NON_THRESHOLD_EVALUATOR_H__CMU_
#define NON_THRESHOLD_EVALUATOR_H__CMU_

#include "threshold_evaluator.h"

#include <vector>
#include <string>
using namespace std;

class non_threshold_evaluator {
public :
	virtual double evaluate (vector<int> & label_list, vector<double> & score_list, string output, int bin) = 0;
};

class average_precision_evaluator : public non_threshold_evaluator {
public :
	virtual double evaluate (vector<int> & label_list, vector<double> & score_list, string output, int bin);
};

class graph_based_evaluator : public non_threshold_evaluator {
public :
	virtual double evaluate (vector<int> & label_list, vector<double> & score_list, string output, int bin);
protected :
	virtual threshold_evaluator * get_x_evaluator() = 0;
	virtual threshold_evaluator * get_y_evaluator() = 0;
};

class avg_prec_evaluator : public graph_based_evaluator {
protected :
	virtual threshold_evaluator * get_x_evaluator();
	virtual threshold_evaluator * get_y_evaluator();
};

class fpr_fnr_evaluator : public graph_based_evaluator {
protected :
	virtual threshold_evaluator * get_x_evaluator();
	virtual threshold_evaluator * get_y_evaluator();
};

non_threshold_evaluator * get_non_threshold_evaluator(string type);

#endif